package com.hotel.tv.application.admin.configure;

import com.autumn.audited.ClientInfoProvider;
import com.hotel.tv.runtime.security.HotelUserCredentialsService;
import com.hotel.tv.services.HotelAuthorizationService;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;

/**
 * <p>
 * </p>
 *
 * @description TODO
 * @author: 老码农
 * @create: 2020-04-10 15:09
 **/
@Configuration
public class AdminConfigure {

    /**
     * @param authorizationService
     * @param clientInfoProvider
     * @return
     */
    @Bean
    @Primary
    public HotelUserCredentialsService hotelUserCredentialsService(HotelAuthorizationService authorizationService,
                                                                   ClientInfoProvider clientInfoProvider) {
        return new HotelUserCredentialsService(authorizationService, clientInfoProvider, true);
    }

}
